package swu.commodity;

import java.util.Date;

public class Commodity
{
    private int id = -1;
    private String name;
    private String origin;
    private double price;
    private String category;
    private Date productionDate;
    private String image;

    public Commodity(){}

    public Commodity(int id,String name,String origin,double price,String category,Date productionDate,String image)
    {
        this.setId(id);
        this.setCategory(category);
        this.setImage(image);
        this.setName(name);
        this.setOrigin(origin);
        this.setPrice(price);
        this.setProductionDate(productionDate);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Date getProductionDate() {
        return productionDate;
    }

    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String toString()
    {
        return String.format("%s, %s, %s, %s, %s, %s, %s",
                this.getId(), this.getName(), this.getPrice(),
                this.getCategory(), this.getProductionDate(),
                this.getOrigin(), this.getImage());
    }
}
